import { requestHasToken } from '@/utils/request'

/**
 * getAreaById
 */
export function getAreaById(data = {}) {
  let { id = 1 } = data
  return requestHasToken({
    method: 'get',
    url: `/area/getAreaById/${id}`,
    data,
    params: data
  })
}

/**
 * getAreaByParentid
 */
export function getAreaByParentid(data) {
  let { parentid = 0 } = data
  return requestHasToken({
    method: 'get',
    url: `/area/getAreaByParentid/${parentid}`,
    data,
    params: data
  })
}
